package com.richinfo.gateway;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;

import com.richinfo.gateway.filter.AccessFilter;

/**
* Created by WangXJ
* 2018-11-06 10:33
*/
@EnableZuulProxy//开启Zuul的API网关服务功能
@SpringCloudApplication
public class Application {

	private static Logger logger = LoggerFactory.getLogger(Application.class);
	
	@Bean
	public AccessFilter accessFilter() {
		return new AccessFilter();
	}
	
	public static void main(String[] args) {

		SpringApplication.run(Application.class, args);
		
		logger.info("====== ZUUL GATEWAY START ======");
	}

}
